package cn.anlaser.service;

import java.util.List;

import cn.anlaser.entity.CommonEntity;
import cn.anlaser.entity.RelatedEntity;
import cn.anlaser.form.RelatedForm;
import cn.anlaser.repository.RelatedRepository;

public interface RelatedService<Form extends RelatedForm, Repository extends RelatedRepository<Form, Entity, Prefix, Postfix>, Entity extends RelatedEntity<Prefix, Postfix>, Prefix extends CommonEntity, Postfix extends CommonEntity> {
	public abstract Repository getRepository();

	public Prefix findPreFix(Long preFixId);

	public Postfix findPostFix(Long postFixId);

	public Entity setRelated(Form entity);

	public void removeRelated(Form entity);

	public List<Entity> findRelateds(Entity entity);

	public List<Prefix> findUnPreFix(Long postFixId);

	public List<Postfix> findUnPostFix(Long preFixId);

	public abstract Class<Entity> getEntityClazz();
	public String module();

}
